<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="tab.css">
</head>
<body>
    <div class="box">
        <label>
            <img src="./15图/三神.jpg" id="eye">
        </label>
        <input type="password" id="pwd">
    </div>
    <script>
        var eye = document.getElementById('eye');
        var pwd = document.getElementById('pwd');
        eye.onclick = function(){
            if (pwd.type = 'password'){
                pwd.type = 'text';
                eye.src = '';
            }else{
                pwd.type = 'password';
                eye.src = '';
            }
        };
    </script>
</body>
</html>